﻿namespace Sidvall.WorkItemManager.Net.Services.V1
{
    public sealed partial class WorkRetryPolicyCollectionItem : global::Sidvall.Data.ServiceDataRowCollectionItem<global::Sidvall.WorkItemManager.Net.Services.V1.WorkRetryPolicy>
    {
        #region Public Members

        #region LoadWorkItemsAsync

        public async System.Threading.Tasks.Task LoadWorkItemsAsync()
        {
            await LoadWorkItemsAsync(false, false, null, null, null).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task LoadWorkItemsAsync(bool refresh, bool raisePropertyChanged, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemRelation> criteria, string strategyContext, global::Sidvall.Data.ObjectParameterCollection objectParameters)
        {
            await global::Sidvall.WorkItemManager.SystemContext.Current.DataPortal.WorkRetryPolicyManager.LoadWorkItemsAsync(this.Items, refresh, raisePropertyChanged, criteria, strategyContext, objectParameters).ConfigureAwait(false);
        }

        #endregion

        #region Copy

        public WorkRetryPolicyCollectionItem Copy()
        {
            return global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Copy(this.Items);
        }
        public WorkRetryPolicyCollectionItem Copy(Sidvall.Data.CopySettings settings)
        {
            return global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Copy(this.Items, settings);
        }

        #endregion
        #region Import

        public void Import(System.Collections.Generic.IEnumerable<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy> items)
        {
            global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Import(this.Items, items);
        }
        public void Import(System.Collections.Generic.IEnumerable<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy> items, Sidvall.Data.CopySettings settings)
        {
            global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Import(this.Items, items, settings);
        }

        #endregion
        #region SaveItemsAsync

        public async System.Threading.Tasks.Task<WorkRetryPolicyCollectionItem> SaveItemsAsync()
        {
            return await global::Sidvall.WorkItemManager.SystemContext.Current.DataPortal.WorkRetryPolicyManager.SaveItemsAsync(this).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<WorkRetryPolicyCollectionItem> SaveItemsAsync(Sidvall.Data.SaveMode mode)
        {
            return await global::Sidvall.WorkItemManager.SystemContext.Current.DataPortal.WorkRetryPolicyManager.SaveItemsAsync(this, mode).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<WorkRetryPolicyCollectionItem> SaveItemsAsync(Sidvall.Data.SaveSettings settings)
        {
            return await global::Sidvall.WorkItemManager.SystemContext.Current.DataPortal.WorkRetryPolicyManager.SaveItemsAsync(this, settings).ConfigureAwait(false);
        }

        #endregion
        #region ValidateAsync

        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync()
        {
            return await global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.ValidateAsync(this.Items).ConfigureAwait(false);
        }
        public async System.Threading.Tasks.Task<Sidvall.Data.BusinessRuleCollection> ValidateAsync(Sidvall.Data.ValidationSettings settings)
        {
            return await global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.ValidateAsync(this.Items, settings).ConfigureAwait(false);
        }

        #endregion
        #region Initialize

        public void Initialize()
        {
            global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Initialize(this.Items);
        }
        public void Initialize(Sidvall.Data.InitializeSettings settings)
        {
            global::Sidvall.WorkItemManager.SystemContext.Current.EntityFacade.WorkRetryPolicyManager.Initialize(this.Items, settings);
        }

        #endregion

        #endregion
        #region Constructors

        public WorkRetryPolicyCollectionItem()
        {
        }
        public WorkRetryPolicyCollectionItem(System.Collections.Generic.IEnumerable<global::Sidvall.WorkItemManager.Net.Services.V1.WorkRetryPolicy> items)
            : base(items)
        {
        }

        #endregion
    }
}